AdVolumeController

Controls audio of ads rendered by the SDK — all ad formats except In-Stream, whose volume is derived from the content player of the application.

The setting is global and applies to every ad shown after it is set, so it can be bound to the sound settings of the application. While nothing is set here, ad volume is defined by the creative, as before.

Properties

Link copied to clipboard
Link copied to clipboard

The value set by setVolume. Default value is 1.0.

Functions

Link copied to clipboard
fun setMuted(muted: Boolean)

Mutes or unmutes audio of ads rendered by the SDK. The volume set by setVolume is kept while muted and is restored on unmute.

Link copied to clipboard
fun setVolume(@FloatRange(from = 0.0, to = 1.0) volume: Float)

Sets the volume ads rendered by the SDK are played at. The value replaces the volume requested by the creative rather than scaling it.